<table>
<tr>
<td>
<ul id="sidepost">
  	<li id="header_search">
		<form method="get" action="search.php">
		<input type="text" name="q" autocomplete="off" id="header_search_query" class="round-left"/>
		<input type="submit" value="" id="header_search_submit" class="round-right"/>
		</form>
	</li>
</ul>
<hr />
<div id="trends">
	<h2 id="trends_title">
		<span>Trending Topics</span>
	</h2>
	<ul id="trend_entries" class="sidebar-menu">
	</ul>
</div>
<hr />
<div id="following">
	<h2 id="following_title">
		<span>Following</span>
	</h2>
	<div id="following_list">
	</div>
</div>
<hr />
<div id="toolbox">
	<h2 id="toolbox_title">
		<span>Toolbox</span>
	</h2>
	<ul id="tools_list" class="sidebar-menu">
		<li><a class="in-page-link" href="nexus.php"><span>Nexus</span></a></li>
	</ul>
</div>
<hr />
<div id="apihealth">
	<h2 id="apihealth_title">
		<span>API Health</span>
	</h2>
	<ul id="apihealth_list" class="sidebar-menu">
		<li>
			<div class="ratelimit">
				<?php $status = $t->ratelimit(); ?>
				<div class="ratelimit_graph">
					<div class="inner" style="width: <?php echo $status->remaining_hits * 100 / $status->hourly_limit; ?>%;">
						<span><?php echo $status->hourly_limit; ?>/h</span>
					</div>	
				</div>
				
				<div class="ratelimit_graph">
					<div class="inner" style="width: <?php echo ($status->reset_time_in_seconds - time()) * 100 / 3600; ?>%;">
						<span><?php echo $status->reset_time_in_seconds - time(); ?>s</span>
					</div>	
				</div>
			</div>
		</li>
	</ul>
</div>
<hr />
<!--Preload Start-->
<div class="preload" style="position: absolute; left: -9999em; top: -9999em;">
	<img src="img/spinner.gif" />
	<img src="img/toggle_up_dark.png" />
	<img src="img/sprite-icons.png" />
	<img src="/img/square.gif" />
</div>
<!--Preload End-->
</td>
</tr>
</table>
</td>